#ifndef UTHREAD_H_INCLUDED
#define UTHREAD_H_INCLUDED

#include <ucontext.h>
#include "queue.h"
//typedef struct uthread_mutex {
    //  queue_t* queue;
//}uthread_mutex_t;
typedef struct uthread_mutex {
    queue_t* queue;
}uthread_mutex_t;
//typedef struct uthread_mutex uthread_mutex_t;

void uthread_init();
int  uthread_create(void (*func)(int), int val, int pri);
void uthread_yield();
void uthread_exit();
void uthread_mutex_init(uthread_mutex_t *lockVar);
void uthread_mutex_lock(uthread_mutex_t *lockVar);
void uthread_mutex_unlock(uthread_mutex_t *lockVar);


#endif //UTHREAD_H_INCLUDED
